package com.zyf.retrofitdemo.proxy;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @author zyf
 * @date 2018/3/1
 * @time 14:17
 */

public class CglibDynamicProxy implements MethodInterceptor {
    @Override
    public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
        System.out.println("----------代理前----------" );
        proxy.invokeSuper(obj, args);
        System.out.println("----------代理后----------" );
        return null;
    }
}
